package first.endtoend;

import org.mbds.wolf.android.hce.seservice.WolfHceService;
import org.mbds.wolf.seql.APDUCommand;

import android.os.Bundle;

public class EndToEndHCEService extends WolfHceService {
	
	private final static String FIELD_KEY = "key";
	
	/**
	 * Implementation of inherited HCE abstract method
	 */
	@Override
	public byte[] processCommandApdu(byte[] commandApdu, Bundle extras) {
		APDUCommand apduCmd;

//	try {
//			apduCmd = new APDUCommand(commandApdu);
//			// Check if trying to read encryption key
//			if ((apduCmd.getIns()==model.getIns(SeqlCommand.SELECT)[1]) //NullPointerException ICI (virtual method)
//					&& (apduCmd.getP1()==model.getFieldValue(FIELD_KEY))) {
//				return APDUModel.SW_PIN_REQUIRED;
//			}
//		} catch (WolfException e) {
//			return APDUModel.SW_INVALID_FORMAT;
//		}
		return super.processCommandApdu(commandApdu, extras);
	}
}
